const SM4 = require('./index');

function main() {
  const key = '0123456789abcdeffedcba9876543210'; // 可以为 16 进制串或字节数组，要求为 128 比特
  const plain = 'hello world!';
  const sm4 = new SM4(key);
  const result = sm4.encrypt(plain);
  const plain1 = sm4.decrypt(result);
  console.log('SM4 加密', result);
  console.log('SM4 解密', plain1);
}

main();
